package com.javatest.springbootactivemq.config;

import javax.jms.Queue;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Created with IntelliJ IDEA. Description:
 *
 * @author lzy
 * @create 2019-12-03 上午9:05
 */
@Configuration
@EnableJms
@EnableScheduling
public class QueueProducerConfigBean {
  @Value("${myqueue}")
  private String myQueue;

  @Bean
  public Queue queue() {
    return new ActiveMQQueue(myQueue);
  }
}
